package com.maoye.ossp.bpm.bpmweb.controller.executor;

import com.maoye.ossp.bpm.bpmweb.utils.DataHolder;
import com.maoye.ossp.bpmagent.engine.ITaskEngine;

public class TaskExecutor extends BpmxExecutor {

	private ITaskEngine engine;

	public TaskExecutor(ITaskEngine engine) {
		this.engine = engine;
	}

	@Override
	public String doExecute(DataHolder holder) {
		return engine.executeTask(holder.getData("bpm").toString(), holder
				.getData("vars").toString(), holder.getParameter("userKey")
				.toString());
	}

}
